<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span class="hs-cpp">
#if __GLASGOW_HASKELL__ &gt;= 702
</span><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">#if __GLASGOW_HASKELL__ &gt;= 710
</span><span class="hs-pragma">{-# LANGUAGE AutoDeriveTypeable #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Module      :  Control.Monad.Trans.Writer.Lazy</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Copyright   :  (c) Andy Gill 2001,</span><span>
</span><span id="line-12"></span><span class="hs-comment">--                (c) Oregon Graduate Institute of Science and Technology, 2001</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE)</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Maintainer  :  R.Paterson@city.ac.uk</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- The lazy 'WriterT' monad transformer, which adds collection of</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- outputs (such as a count or string output) to a given monad.</span><span>
</span><span id="line-21"></span><span class="hs-comment">--</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- This monad transformer provides only limited access to the output</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- during the computation.  For more general access, use</span><span>
</span><span id="line-24"></span><span class="hs-comment">-- &quot;Control.Monad.Trans.State&quot; instead.</span><span>
</span><span id="line-25"></span><span class="hs-comment">--</span><span>
</span><span id="line-26"></span><span class="hs-comment">-- This version builds its output lazily; for a constant-space version</span><span>
</span><span id="line-27"></span><span class="hs-comment">-- with almost the same interface, see &quot;Control.Monad.Trans.Writer.CPS&quot;.</span><span>
</span><span id="line-28"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Control.Monad.Trans.Writer.Lazy</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><span class="hs-comment">-- * The Writer monad</span></span><span>
</span><span id="line-32"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#Writer"><span class="hs-identifier">Writer</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#writer"><span class="hs-identifier">writer</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#runWriter"><span class="hs-identifier">runWriter</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#execWriter"><span class="hs-identifier">execWriter</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriter"><span class="hs-identifier">mapWriter</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>    </span><span class="annot"><span class="hs-comment">-- * The WriterT monad transformer</span></span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier">WriterT</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#execWriterT"><span class="hs-identifier">execWriterT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriterT"><span class="hs-identifier">mapWriterT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Writer operations</span></span><span>
</span><span id="line-42"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#tell"><span class="hs-identifier">tell</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#listen"><span class="hs-identifier">listen</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#listens"><span class="hs-identifier">listens</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#pass"><span class="hs-identifier">pass</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#censor"><span class="hs-identifier">censor</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Lifting other operations</span></span><span>
</span><span id="line-48"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#liftCallCC"><span class="hs-identifier">liftCallCC</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#liftCatch"><span class="hs-identifier">liftCatch</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-50"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#"><span class="hs-identifier">Control.Monad.IO.Class</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Class.html"><span class="hs-identifier">Control.Monad.Trans.Class</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#"><span class="hs-identifier">Data.Functor.Classes</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,12,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#"><span class="hs-identifier">Data.Functor.Contravariant</span></a></span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Identity.html#"><span class="hs-identifier">Data.Functor.Identity</span></a></span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#"><span class="hs-identifier">Control.Monad.Fail</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Fail</span></span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#"><span class="hs-identifier">Control.Monad.Fix</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html"><span class="hs-identifier">Control.Monad.Signatures</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,4,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#"><span class="hs-identifier">Control.Monad.Zip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#MonadZip"><span class="hs-identifier">MonadZip</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#mzipWith"><span class="hs-identifier">mzipWith</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#"><span class="hs-identifier">Data.Foldable</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Monoid.html#"><span class="hs-identifier">Data.Monoid</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#"><span class="hs-identifier">Data.Traversable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier">Traversable</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier">traverse</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier">null</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier">length</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- | A writer monad parameterized by the type @w@ of output to accumulate.</span><span>
</span><span id="line-77"></span><span class="hs-comment">--</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- The 'return' function produces the output 'mempty', while @&gt;&gt;=@</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- combines the outputs of the subcomputations using 'mappend'.</span><span>
</span><span id="line-80"></span><span class="hs-keyword">type</span><span> </span><span id="Writer"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#Writer"><span class="hs-identifier hs-var">Writer</span></a></span></span><span> </span><span id="local-6989586621679082996"><span class="annot"><a href="#local-6989586621679082996"><span class="hs-identifier hs-type">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679082996"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-type">Identity</span></a></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- | Construct a writer computation from a (result, output) pair.</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- (The inverse of 'runWriter'.)</span><span>
</span><span id="line-84"></span><span id="local-6989586621679083476"><span id="local-6989586621679083477"><span id="local-6989586621679083478"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#writer"><span class="hs-identifier hs-type">writer</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083478"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083477"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083476"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083476"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083478"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083477"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-85"></span><span id="writer"><span class="annot"><span class="annottext">writer :: forall (m :: * -&gt; *) a w. Monad m =&gt; (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#writer"><span class="hs-identifier hs-var hs-var">writer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a)
-&gt; ((a, w) -&gt; m (a, w)) -&gt; (a, w) -&gt; WriterT w m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m (a, w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-86"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#writer"><span class="hs-pragma hs-type">writer</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="hs-comment">-- | Unwrap a writer computation as a (result, output) pair.</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- (The inverse of 'writer'.)</span><span>
</span><span id="line-90"></span><span id="local-6989586621679083463"><span id="local-6989586621679083464"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#runWriter"><span class="hs-identifier hs-type">runWriter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#Writer"><span class="hs-identifier hs-type">Writer</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083464"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083463"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083463"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083464"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-91"></span><span id="runWriter"><span class="annot"><span class="annottext">runWriter :: forall w a. Writer w a -&gt; (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriter"><span class="hs-identifier hs-var hs-var">runWriter</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Identity (a, w) -&gt; (a, w)
forall a. Identity a -&gt; a
</span><a href="../../base/src/Data.Functor.Identity.html#runIdentity"><span class="hs-identifier hs-var hs-var">runIdentity</span></a></span><span> </span><span class="annot"><span class="annottext">(Identity (a, w) -&gt; (a, w))
-&gt; (WriterT w Identity a -&gt; Identity (a, w))
-&gt; WriterT w Identity a
-&gt; (a, w)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w Identity a -&gt; Identity (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span>
</span><span id="line-92"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#runWriter"><span class="hs-pragma hs-type">runWriter</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="hs-comment">-- | Extract the output from a writer computation.</span><span>
</span><span id="line-95"></span><span class="hs-comment">--</span><span>
</span><span id="line-96"></span><span class="hs-comment">-- * @'execWriter' m = 'snd' ('runWriter' m)@</span><span>
</span><span id="line-97"></span><span id="local-6989586621679083456"><span id="local-6989586621679083457"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#execWriter"><span class="hs-identifier hs-type">execWriter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#Writer"><span class="hs-identifier hs-type">Writer</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083457"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083456"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679083457"><span class="hs-identifier hs-type">w</span></a></span></span></span><span>
</span><span id="line-98"></span><span id="execWriter"><span class="annot"><span class="annottext">execWriter :: forall w a. Writer w a -&gt; w
</span><a href="Control.Monad.Trans.Writer.Lazy.html#execWriter"><span class="hs-identifier hs-var hs-var">execWriter</span></a></span></span><span> </span><span id="local-6989586621679082989"><span class="annot"><span class="annottext">Writer w a
</span><a href="#local-6989586621679082989"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; w
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Writer w a -&gt; (a, w)
forall w a. Writer w a -&gt; (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriter"><span class="hs-identifier hs-var">runWriter</span></a></span><span> </span><span class="annot"><span class="annottext">Writer w a
</span><a href="#local-6989586621679082989"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#execWriter"><span class="hs-pragma hs-type">execWriter</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-comment">-- | Map both the return value and output of a computation using</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- the given function.</span><span>
</span><span id="line-103"></span><span class="hs-comment">--</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- * @'runWriter' ('mapWriter' f m) = f ('runWriter' m)@</span><span>
</span><span id="line-105"></span><span id="local-6989586621679083448"><span id="local-6989586621679083449"><span id="local-6989586621679083450"><span id="local-6989586621679083451"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriter"><span class="hs-identifier hs-type">mapWriter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083451"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083450"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083449"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083448"><span class="hs-identifier hs-type">w'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#Writer"><span class="hs-identifier hs-type">Writer</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083450"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083451"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#Writer"><span class="hs-identifier hs-type">Writer</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083448"><span class="hs-identifier hs-type">w'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083449"><span class="hs-identifier hs-type">b</span></a></span></span></span></span></span><span>
</span><span id="line-106"></span><span id="mapWriter"><span class="annot"><span class="annottext">mapWriter :: forall a w b w'. ((a, w) -&gt; (b, w')) -&gt; Writer w a -&gt; Writer w' b
</span><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriter"><span class="hs-identifier hs-var hs-var">mapWriter</span></a></span></span><span> </span><span id="local-6989586621679082988"><span class="annot"><span class="annottext">(a, w) -&gt; (b, w')
</span><a href="#local-6989586621679082988"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Identity (a, w) -&gt; Identity (b, w'))
-&gt; WriterT w Identity a -&gt; WriterT w' Identity b
forall (m :: * -&gt; *) a w (n :: * -&gt; *) b w'.
(m (a, w) -&gt; n (b, w')) -&gt; WriterT w m a -&gt; WriterT w' n b
</span><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriterT"><span class="hs-identifier hs-var">mapWriterT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b, w') -&gt; Identity (b, w')
forall a. a -&gt; Identity a
</span><a href="../../base/src/Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-var">Identity</span></a></span><span> </span><span class="annot"><span class="annottext">((b, w') -&gt; Identity (b, w'))
-&gt; (Identity (a, w) -&gt; (b, w'))
-&gt; Identity (a, w)
-&gt; Identity (b, w')
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; (b, w')
</span><a href="#local-6989586621679082988"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">((a, w) -&gt; (b, w'))
-&gt; (Identity (a, w) -&gt; (a, w)) -&gt; Identity (a, w) -&gt; (b, w')
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Identity (a, w) -&gt; (a, w)
forall a. Identity a -&gt; a
</span><a href="../../base/src/Data.Functor.Identity.html#runIdentity"><span class="hs-identifier hs-var hs-var">runIdentity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriter"><span class="hs-pragma hs-type">mapWriter</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-110"></span><span class="hs-comment">-- | A writer monad parameterized by:</span><span>
</span><span id="line-111"></span><span class="hs-comment">--</span><span>
</span><span id="line-112"></span><span class="hs-comment">--   * @w@ - the output to accumulate.</span><span>
</span><span id="line-113"></span><span class="hs-comment">--</span><span>
</span><span id="line-114"></span><span class="hs-comment">--   * @m@ - The inner monad.</span><span>
</span><span id="line-115"></span><span class="hs-comment">--</span><span>
</span><span id="line-116"></span><span class="hs-comment">-- The 'return' function produces the output 'mempty', while @&gt;&gt;=@</span><span>
</span><span id="line-117"></span><span class="hs-comment">-- combines the outputs of the subcomputations using 'mappend'.</span><span>
</span><span id="line-118"></span><span class="hs-keyword">newtype</span><span> </span><span id="WriterT"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span></span><span> </span><span id="local-6989586621679083470"><span class="annot"><a href="#local-6989586621679083470"><span class="hs-identifier hs-type">w</span></a></span></span><span> </span><span id="local-6989586621679083472"><span class="annot"><a href="#local-6989586621679083472"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621679083471"><span class="annot"><a href="#local-6989586621679083471"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="WriterT"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="runWriterT"><span class="annot"><span class="annottext">forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679083472"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083471"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083470"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span id="local-6989586621679083427"><span id="local-6989586621679083428"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679083428"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083427"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083428"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083427"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-121"></span><span>    </span><span id="local-6989586621679082977"><span class="annot"><span class="annottext">liftEq :: forall a b.
(a -&gt; b -&gt; Bool) -&gt; WriterT w m a -&gt; WriterT w m b -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftEq</span></a></span></span><span> </span><span id="local-6989586621679082975"><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679082975"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span id="local-6989586621679082974"><span class="annot"><span class="annottext">m (a, w)
</span><a href="#local-6989586621679082974"><span class="hs-identifier hs-var">m1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span id="local-6989586621679082973"><span class="annot"><span class="annottext">m (b, w)
</span><a href="#local-6989586621679082973"><span class="hs-identifier hs-var">m2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((a, w) -&gt; (b, w) -&gt; Bool) -&gt; m (a, w) -&gt; m (b, w) -&gt; Bool
forall (f :: * -&gt; *) a b.
Eq1 f =&gt;
(a -&gt; b -&gt; Bool) -&gt; f a -&gt; f b -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var">liftEq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Bool) -&gt; (w -&gt; w -&gt; Bool) -&gt; (a, w) -&gt; (b, w) -&gt; Bool
forall (f :: * -&gt; * -&gt; *) a b c d.
Eq2 f =&gt;
(a -&gt; b -&gt; Bool) -&gt; (c -&gt; d -&gt; Bool) -&gt; f a c -&gt; f b d -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#liftEq2"><span class="hs-identifier hs-var">liftEq2</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679082975"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; w -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">(==)</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (a, w)
</span><a href="#local-6989586621679082974"><span class="hs-identifier hs-var">m1</span></a></span><span> </span><span class="annot"><span class="annottext">m (b, w)
</span><a href="#local-6989586621679082973"><span class="hs-identifier hs-var">m2</span></a></span><span>
</span><span id="line-122"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-pragma hs-type">liftEq</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span id="local-6989586621679083410"><span id="local-6989586621679083411"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679083411"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083410"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083411"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083410"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-125"></span><span>    </span><span id="local-6989586621679082958"><span class="annot"><span class="annottext">liftCompare :: forall a b.
(a -&gt; b -&gt; Ordering) -&gt; WriterT w m a -&gt; WriterT w m b -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftCompare</span></a></span></span><span> </span><span id="local-6989586621679082956"><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679082956"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span id="local-6989586621679082955"><span class="annot"><span class="annottext">m (a, w)
</span><a href="#local-6989586621679082955"><span class="hs-identifier hs-var">m1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span id="local-6989586621679082954"><span class="annot"><span class="annottext">m (b, w)
</span><a href="#local-6989586621679082954"><span class="hs-identifier hs-var">m2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-126"></span><span>        </span><span class="annot"><span class="annottext">((a, w) -&gt; (b, w) -&gt; Ordering) -&gt; m (a, w) -&gt; m (b, w) -&gt; Ordering
forall (f :: * -&gt; *) a b.
Ord1 f =&gt;
(a -&gt; b -&gt; Ordering) -&gt; f a -&gt; f b -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var">liftCompare</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Ordering)
-&gt; (w -&gt; w -&gt; Ordering) -&gt; (a, w) -&gt; (b, w) -&gt; Ordering
forall (f :: * -&gt; * -&gt; *) a b c d.
Ord2 f =&gt;
(a -&gt; b -&gt; Ordering)
-&gt; (c -&gt; d -&gt; Ordering) -&gt; f a c -&gt; f b d -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#liftCompare2"><span class="hs-identifier hs-var">liftCompare2</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679082956"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; w -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (a, w)
</span><a href="#local-6989586621679082955"><span class="hs-identifier hs-var">m1</span></a></span><span> </span><span class="annot"><span class="annottext">m (b, w)
</span><a href="#local-6989586621679082954"><span class="hs-identifier hs-var">m2</span></a></span><span>
</span><span id="line-127"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-pragma hs-type">liftCompare</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span id="local-6989586621679083393"><span id="local-6989586621679083394"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082945"><span id="local-6989586621679082947"><span id="local-6989586621679082949"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083394"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083393"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083394"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083393"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-130"></span><span>    </span><span id="local-6989586621679082942"><span class="annot"><span class="annottext">liftReadsPrec :: forall a.
(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; Int -&gt; ReadS (WriterT w m a)
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftReadsPrec</span></a></span></span><span> </span><span id="local-6989586621679082940"><span class="annot"><span class="annottext">Int -&gt; ReadS a
</span><a href="#local-6989586621679082940"><span class="hs-identifier hs-var">rp</span></a></span></span><span> </span><span id="local-6989586621679082939"><span class="annot"><span class="annottext">ReadS [a]
</span><a href="#local-6989586621679082939"><span class="hs-identifier hs-var">rl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; ReadS (WriterT w m a)) -&gt; Int -&gt; ReadS (WriterT w m a)
forall a. (String -&gt; ReadS a) -&gt; Int -&gt; ReadS a
</span><a href="../../base/src/Data.Functor.Classes.html#readsData"><span class="hs-identifier hs-var">readsData</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; ReadS (WriterT w m a)) -&gt; Int -&gt; ReadS (WriterT w m a))
-&gt; (String -&gt; ReadS (WriterT w m a))
-&gt; Int
-&gt; ReadS (WriterT w m a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-131"></span><span>        </span><span class="annot"><span class="annottext">(Int -&gt; ReadS (m (a, w)))
-&gt; String
-&gt; (m (a, w) -&gt; WriterT w m a)
-&gt; String
-&gt; ReadS (WriterT w m a)
forall a t.
(Int -&gt; ReadS a) -&gt; String -&gt; (a -&gt; t) -&gt; String -&gt; ReadS t
</span><a href="../../base/src/Data.Functor.Classes.html#readsUnaryWith"><span class="hs-identifier hs-var">readsUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; ReadS (a, w)) -&gt; ReadS [(a, w)] -&gt; Int -&gt; ReadS (m (a, w))
forall (f :: * -&gt; *) a.
Read1 f =&gt;
(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; Int -&gt; ReadS (f a)
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadsPrec"><span class="hs-identifier hs-var">liftReadsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS (a, w)
</span><a href="#local-6989586621679082936"><span class="hs-identifier hs-var">rp'</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS [(a, w)]
</span><a href="#local-6989586621679082935"><span class="hs-identifier hs-var">rl'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;WriterT&quot;</span></span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span>
</span><span id="line-132"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-133"></span><span>        </span><span id="local-6989586621679082936"><span class="annot"><span class="annottext">rp' :: Int -&gt; ReadS (a, w)
</span><a href="#local-6989586621679082936"><span class="hs-identifier hs-var hs-var">rp'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; ReadS a)
-&gt; ReadS [a]
-&gt; (Int -&gt; ReadS w)
-&gt; ReadS [w]
-&gt; Int
-&gt; ReadS (a, w)
forall (f :: * -&gt; * -&gt; *) a b.
Read2 f =&gt;
(Int -&gt; ReadS a)
-&gt; ReadS [a]
-&gt; (Int -&gt; ReadS b)
-&gt; ReadS [b]
-&gt; Int
-&gt; ReadS (f a b)
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadsPrec2"><span class="hs-identifier hs-var">liftReadsPrec2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS a
</span><a href="#local-6989586621679082940"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS [a]
</span><a href="#local-6989586621679082939"><span class="hs-identifier hs-var">rl</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS w
forall a. Read a =&gt; Int -&gt; ReadS a
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var">readsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS [w]
forall a. Read a =&gt; ReadS [a]
</span><a href="../../base/src/GHC.Read.html#readList"><span class="hs-identifier hs-var">readList</span></a></span><span>
</span><span id="line-134"></span><span>        </span><span id="local-6989586621679082935"><span class="annot"><span class="annottext">rl' :: ReadS [(a, w)]
</span><a href="#local-6989586621679082935"><span class="hs-identifier hs-var hs-var">rl'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; (Int -&gt; ReadS w) -&gt; ReadS [w] -&gt; ReadS [(a, w)]
forall (f :: * -&gt; * -&gt; *) a b.
Read2 f =&gt;
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; (Int -&gt; ReadS b) -&gt; ReadS [b] -&gt; ReadS [f a b]
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadList2"><span class="hs-identifier hs-var">liftReadList2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS a
</span><a href="#local-6989586621679082940"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS [a]
</span><a href="#local-6989586621679082939"><span class="hs-identifier hs-var">rl</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS w
forall a. Read a =&gt; Int -&gt; ReadS a
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var">readsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS [w]
forall a. Read a =&gt; ReadS [a]
</span><a href="../../base/src/GHC.Read.html#readList"><span class="hs-identifier hs-var">readList</span></a></span></span></span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span id="local-6989586621679083373"><span id="local-6989586621679083374"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082921"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083374"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083373"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083374"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083373"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-137"></span><span>    </span><span id="local-6989586621679082918"><span class="annot"><span class="annottext">liftShowsPrec :: forall a.
(Int -&gt; a -&gt; ShowS)
-&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; WriterT w m a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftShowsPrec</span></a></span></span><span> </span><span id="local-6989586621679082916"><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679082916"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621679082915"><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679082915"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621679082914"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679082914"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span id="local-6989586621679082913"><span class="annot"><span class="annottext">m (a, w)
</span><a href="#local-6989586621679082913"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-138"></span><span>        </span><span class="annot"><span class="annottext">(Int -&gt; m (a, w) -&gt; ShowS) -&gt; String -&gt; Int -&gt; m (a, w) -&gt; ShowS
forall a. (Int -&gt; a -&gt; ShowS) -&gt; String -&gt; Int -&gt; a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#showsUnaryWith"><span class="hs-identifier hs-var">showsUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; (a, w) -&gt; ShowS)
-&gt; ([(a, w)] -&gt; ShowS) -&gt; Int -&gt; m (a, w) -&gt; ShowS
forall (f :: * -&gt; *) a.
Show1 f =&gt;
(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; f a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var">liftShowsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; (a, w) -&gt; ShowS
</span><a href="#local-6989586621679082911"><span class="hs-identifier hs-var">sp'</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, w)] -&gt; ShowS
</span><a href="#local-6989586621679082910"><span class="hs-identifier hs-var">sl'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;WriterT&quot;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679082914"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, w)
</span><a href="#local-6989586621679082913"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-139"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-140"></span><span>        </span><span id="local-6989586621679082911"><span class="annot"><span class="annottext">sp' :: Int -&gt; (a, w) -&gt; ShowS
</span><a href="#local-6989586621679082911"><span class="hs-identifier hs-var hs-var">sp'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; a -&gt; ShowS)
-&gt; ([a] -&gt; ShowS)
-&gt; (Int -&gt; w -&gt; ShowS)
-&gt; ([w] -&gt; ShowS)
-&gt; Int
-&gt; (a, w)
-&gt; ShowS
forall (f :: * -&gt; * -&gt; *) a b.
Show2 f =&gt;
(Int -&gt; a -&gt; ShowS)
-&gt; ([a] -&gt; ShowS)
-&gt; (Int -&gt; b -&gt; ShowS)
-&gt; ([b] -&gt; ShowS)
-&gt; Int
-&gt; f a b
-&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowsPrec2"><span class="hs-identifier hs-var">liftShowsPrec2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679082916"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679082915"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; w -&gt; ShowS
forall a. Show a =&gt; Int -&gt; a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">[w] -&gt; ShowS
forall a. Show a =&gt; [a] -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showList"><span class="hs-identifier hs-var">showList</span></a></span><span>
</span><span id="line-141"></span><span>        </span><span id="local-6989586621679082910"><span class="annot"><span class="annottext">sl' :: [(a, w)] -&gt; ShowS
</span><a href="#local-6989586621679082910"><span class="hs-identifier hs-var hs-var">sl'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; a -&gt; ShowS)
-&gt; ([a] -&gt; ShowS)
-&gt; (Int -&gt; w -&gt; ShowS)
-&gt; ([w] -&gt; ShowS)
-&gt; [(a, w)]
-&gt; ShowS
forall (f :: * -&gt; * -&gt; *) a b.
Show2 f =&gt;
(Int -&gt; a -&gt; ShowS)
-&gt; ([a] -&gt; ShowS)
-&gt; (Int -&gt; b -&gt; ShowS)
-&gt; ([b] -&gt; ShowS)
-&gt; [f a b]
-&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowList2"><span class="hs-identifier hs-var">liftShowList2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679082916"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679082915"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; w -&gt; ShowS
forall a. Show a =&gt; Int -&gt; a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">[w] -&gt; ShowS
forall a. Show a =&gt; [a] -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showList"><span class="hs-identifier hs-var">showList</span></a></span></span></span><span>
</span><span id="line-142"></span><span>
</span><span id="line-143"></span><span id="local-6989586621679083361"><span id="local-6989586621679083362"><span id="local-6989586621679083363"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082896"><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679083363"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083362"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679083361"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083363"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083362"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083361"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679082892"><span class="annot"><span class="annottext">== :: WriterT w m a -&gt; WriterT w m a -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">(==)</span></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; WriterT w m a -&gt; Bool
forall (f :: * -&gt; *) a. (Eq1 f, Eq a) =&gt; f a -&gt; f a -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#eq1"><span class="hs-identifier hs-var">eq1</span></a></span></span></span></span><span>
</span><span id="line-144"></span><span id="local-6989586621679083356"><span id="local-6989586621679083357"><span id="local-6989586621679083358"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082876"><span id="local-6989586621679082878"><span id="local-6989586621679082880"><span id="local-6989586621679082882"><span id="local-6989586621679082884"><span id="local-6989586621679082886"><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679083358"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083357"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679083356"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083358"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083357"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083356"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679082872"><span class="annot"><span class="annottext">compare :: WriterT w m a -&gt; WriterT w m a -&gt; Ordering
</span><a href="#local-6989586621679082872"><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; WriterT w m a -&gt; Ordering
forall (f :: * -&gt; *) a. (Ord1 f, Ord a) =&gt; f a -&gt; f a -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#compare1"><span class="hs-identifier hs-var">compare1</span></a></span></span></span></span><span>
</span><span id="line-145"></span><span id="local-6989586621679083351"><span id="local-6989586621679083352"><span id="local-6989586621679083353"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082864"><span id="local-6989586621679082866"><span id="local-6989586621679082868"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083353"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083352"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083351"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083353"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083352"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083351"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-146"></span><span>    </span><span id="local-6989586621679082860"><span class="annot"><span class="annottext">readsPrec :: Int -&gt; ReadS (WriterT w m a)
</span><a href="#local-6989586621679082860"><span class="hs-identifier hs-var hs-var hs-var hs-var">readsPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS (WriterT w m a)
forall (f :: * -&gt; *) a. (Read1 f, Read a) =&gt; Int -&gt; ReadS (f a)
</span><a href="../../base/src/Data.Functor.Classes.html#readsPrec1"><span class="hs-identifier hs-var">readsPrec1</span></a></span></span></span></span><span>
</span><span id="line-147"></span><span id="local-6989586621679083346"><span id="local-6989586621679083347"><span id="local-6989586621679083348"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082854"><span id="local-6989586621679082856"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083348"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083347"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083346"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083348"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083347"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083346"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-148"></span><span>    </span><span id="local-6989586621679082850"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; WriterT w m a -&gt; ShowS
</span><a href="#local-6989586621679082850"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; WriterT w m a -&gt; ShowS
forall (f :: * -&gt; *) a. (Show1 f, Show a) =&gt; Int -&gt; f a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#showsPrec1"><span class="hs-identifier hs-var">showsPrec1</span></a></span></span></span></span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="hs-comment">-- | Extract the output from a writer computation.</span><span>
</span><span id="line-151"></span><span class="hs-comment">--</span><span>
</span><span id="line-152"></span><span class="hs-comment">-- * @'execWriterT' m = 'liftM' 'snd' ('runWriterT' m)@</span><span>
</span><span id="line-153"></span><span id="local-6989586621679083341"><span id="local-6989586621679083342"><span id="local-6989586621679083343"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#execWriterT"><span class="hs-identifier hs-type">execWriterT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083343"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083342"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083343"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083341"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679083343"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083342"><span class="hs-identifier hs-type">w</span></a></span></span></span></span><span>
</span><span id="line-154"></span><span id="execWriterT"><span class="annot"><span class="annottext">execWriterT :: forall (m :: * -&gt; *) w a. Monad m =&gt; WriterT w m a -&gt; m w
</span><a href="Control.Monad.Trans.Writer.Lazy.html#execWriterT"><span class="hs-identifier hs-var hs-var">execWriterT</span></a></span></span><span> </span><span id="local-6989586621679082845"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082845"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-155"></span><span>    </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082844"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082844"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082845"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-156"></span><span>    </span><span class="annot"><span class="annottext">w -&gt; m w
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082844"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-157"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#execWriterT"><span class="hs-pragma hs-type">execWriterT</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span class="hs-comment">-- | Map both the return value and output of a computation using</span><span>
</span><span id="line-160"></span><span class="hs-comment">-- the given function.</span><span>
</span><span id="line-161"></span><span class="hs-comment">--</span><span>
</span><span id="line-162"></span><span class="hs-comment">-- * @'runWriterT' ('mapWriterT' f m) = f ('runWriterT' m)@</span><span>
</span><span id="line-163"></span><span id="local-6989586621679083438"><span id="local-6989586621679083439"><span id="local-6989586621679083440"><span id="local-6989586621679083441"><span id="local-6989586621679083442"><span id="local-6989586621679083443"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriterT"><span class="hs-identifier hs-type">mapWriterT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083443"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083442"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083441"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679083440"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083439"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083438"><span class="hs-identifier hs-type">w'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083441"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083443"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083442"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083438"><span class="hs-identifier hs-type">w'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083440"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083439"><span class="hs-identifier hs-type">b</span></a></span></span></span></span></span></span></span><span>
</span><span id="line-164"></span><span id="mapWriterT"><span class="annot"><span class="annottext">mapWriterT :: forall (m :: * -&gt; *) a w (n :: * -&gt; *) b w'.
(m (a, w) -&gt; n (b, w')) -&gt; WriterT w m a -&gt; WriterT w' n b
</span><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriterT"><span class="hs-identifier hs-var hs-var">mapWriterT</span></a></span></span><span> </span><span id="local-6989586621679082843"><span class="annot"><span class="annottext">m (a, w) -&gt; n (b, w')
</span><a href="#local-6989586621679082843"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679082842"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082842"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">n (b, w') -&gt; WriterT w' n b
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(n (b, w') -&gt; WriterT w' n b) -&gt; n (b, w') -&gt; WriterT w' n b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; n (b, w')
</span><a href="#local-6989586621679082843"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082842"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriterT"><span class="hs-pragma hs-type">mapWriterT</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span id="local-6989586621679083325"><span id="local-6989586621679083326"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082839"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083326"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083325"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083326"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-168"></span><span>    </span><span id="local-6989586621679082836"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; WriterT w m a -&gt; WriterT w m b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679082835"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679082835"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; m (b, w)) -&gt; WriterT w m a -&gt; WriterT w m b
forall (m :: * -&gt; *) a w (n :: * -&gt; *) b w'.
(m (a, w) -&gt; n (b, w')) -&gt; WriterT w m a -&gt; WriterT w' n b
</span><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriterT"><span class="hs-identifier hs-var">mapWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">((m (a, w) -&gt; m (b, w)) -&gt; WriterT w m a -&gt; WriterT w m b)
-&gt; (m (a, w) -&gt; m (b, w)) -&gt; WriterT w m a -&gt; WriterT w m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((a, w) -&gt; (b, w)) -&gt; m (a, w) -&gt; m (b, w)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">(((a, w) -&gt; (b, w)) -&gt; m (a, w) -&gt; m (b, w))
-&gt; ((a, w) -&gt; (b, w)) -&gt; m (a, w) -&gt; m (b, w)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082834"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082834"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082833"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082833"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679082835"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082834"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082833"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-pragma hs-type">fmap</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span id="local-6989586621679083306"><span id="local-6989586621679083307"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082802"><span id="local-6989586621679082804"><span id="local-6989586621679082806"><span id="local-6989586621679082808"><span id="local-6989586621679082810"><span id="local-6989586621679082814"><span id="local-6989586621679082816"><span id="local-6989586621679082818"><span id="local-6989586621679082820"><span id="local-6989586621679082822"><span id="local-6989586621679082824"><span id="local-6989586621679082826"><span id="local-6989586621679082828"><span id="local-6989586621679082831"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083307"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083306"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083307"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-172"></span><span>    </span><span id="local-6989586621679082797"><span class="annot"><span class="annottext">foldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; WriterT w f a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldMap</span></a></span></span><span> </span><span id="local-6989586621679082795"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679082795"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((a, w) -&gt; m) -&gt; f (a, w) -&gt; m
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679082795"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; m) -&gt; ((a, w) -&gt; a) -&gt; (a, w) -&gt; m
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; a
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(f (a, w) -&gt; m)
-&gt; (WriterT w f a -&gt; f (a, w)) -&gt; WriterT w f a -&gt; m
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w f a -&gt; f (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span>
</span><span id="line-173"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-pragma hs-type">foldMap</span></a></span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#if MIN_VERSION_base(4,8,0)
</span><span>    </span><span id="local-6989586621679082793"><span class="annot"><span class="annottext">null :: forall a. WriterT w f a -&gt; Bool
</span><a href="#local-6989586621679082793"><span class="hs-identifier hs-var hs-var hs-var hs-var">null</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span id="local-6989586621679082792"><span class="annot"><span class="annottext">f (a, w)
</span><a href="#local-6989586621679082792"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f (a, w) -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">f (a, w)
</span><a href="#local-6989586621679082792"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-176"></span><span>    </span><span id="local-6989586621679082790"><span class="annot"><span class="annottext">length :: forall a. WriterT w f a -&gt; Int
</span><a href="#local-6989586621679082790"><span class="hs-identifier hs-var hs-var hs-var hs-var">length</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span id="local-6989586621679082789"><span class="annot"><span class="annottext">f (a, w)
</span><a href="#local-6989586621679082789"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f (a, w) -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">f (a, w)
</span><a href="#local-6989586621679082789"><span class="hs-identifier hs-var">t</span></a></span></span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-179"></span><span id="local-6989586621679083287"><span id="local-6989586621679083288"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082778"><span id="local-6989586621679082780"><span id="local-6989586621679082782"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083288"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083287"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083288"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-180"></span><span>    </span><span id="local-6989586621679082771"><span class="annot"><span class="annottext">traverse :: forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; WriterT w f a -&gt; f (WriterT w f b)
</span><a href="#local-6989586621679082771"><span class="hs-identifier hs-var hs-var hs-var hs-var">traverse</span></a></span></span><span> </span><span id="local-6989586621679082770"><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679082770"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(f (b, w) -&gt; WriterT w f b) -&gt; f (f (b, w)) -&gt; f (WriterT w f b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">f (b, w) -&gt; WriterT w f b
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(f (f (b, w)) -&gt; f (WriterT w f b))
-&gt; (WriterT w f a -&gt; f (f (b, w)))
-&gt; WriterT w f a
-&gt; f (WriterT w f b)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((a, w) -&gt; f (b, w)) -&gt; f (a, w) -&gt; f (f (b, w))
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; f (b, w)
forall {b}. (a, b) -&gt; f (b, b)
</span><a href="#local-6989586621679082769"><span class="hs-identifier hs-var">f'</span></a></span><span> </span><span class="annot"><span class="annottext">(f (a, w) -&gt; f (f (b, w)))
-&gt; (WriterT w f a -&gt; f (a, w)) -&gt; WriterT w f a -&gt; f (f (b, w))
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w f a -&gt; f (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-181"></span><span>       </span><span id="local-6989586621679082769"><span class="annot"><span class="annottext">f' :: (a, b) -&gt; f (b, b)
</span><a href="#local-6989586621679082769"><span class="hs-identifier hs-var hs-var">f'</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679082767"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082767"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082766"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082766"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; (b, b)) -&gt; f b -&gt; f (b, b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679082765"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082765"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082765"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082766"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679082770"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082767"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-pragma hs-type">traverse</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span id="local-6989586621679083270"><span id="local-6989586621679083271"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082755"><span id="local-6989586621679082757"><span id="local-6989586621679082759"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083271"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083270"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083271"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083270"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-185"></span><span>    </span><span id="local-6989586621679082751"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; WriterT w m a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679082750"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082750"><span class="hs-identifier hs-var">a</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m (a, w)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082750"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#pure"><span class="hs-pragma hs-type">pure</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-187"></span><span>    </span><span id="local-6989586621679082747"><span class="annot"><span class="annottext">WriterT w m (a -&gt; b)
</span><a href="#local-6989586621679082747"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679082746"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. WriterT w m (a -&gt; b) -&gt; WriterT w m a -&gt; WriterT w m b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;*&gt;</span></a></span></span><span> </span><span id="local-6989586621679082745"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082745"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (b, w) -&gt; WriterT w m b
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (b, w) -&gt; WriterT w m b) -&gt; m (b, w) -&gt; WriterT w m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((a -&gt; b, w) -&gt; (a, w) -&gt; (b, w))
-&gt; m (a -&gt; b, w) -&gt; m (a, w) -&gt; m (b, w)
forall (f :: * -&gt; *) a b c.
Applicative f =&gt;
(a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c
</span><a href="../../base/src/GHC.Base.html#liftA2"><span class="hs-identifier hs-var">liftA2</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b, w) -&gt; (a, w) -&gt; (b, w)
forall {b} {t} {a}. Monoid b =&gt; (t -&gt; a, b) -&gt; (t, b) -&gt; (a, b)
</span><a href="#local-6989586621679082743"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WriterT w m (a -&gt; b) -&gt; m (a -&gt; b, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m (a -&gt; b)
</span><a href="#local-6989586621679082747"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082745"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-188"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679082743"><span class="annot"><span class="annottext">k :: (t -&gt; a, b) -&gt; (t, b) -&gt; (a, b)
</span><a href="#local-6989586621679082743"><span class="hs-identifier hs-var hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082740"><span class="annot"><span class="annottext">t -&gt; a
</span><a href="#local-6989586621679082740"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082739"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082739"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082738"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679082738"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082737"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082737"><span class="hs-identifier hs-var">w'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t -&gt; a
</span><a href="#local-6989586621679082740"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679082738"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082739"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082737"><span class="hs-identifier hs-var">w'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-189"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&lt;*&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-190"></span><span>
</span><span id="line-191"></span><span id="local-6989586621679083257"><span id="local-6989586621679083258"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082729"><span id="local-6989586621679082731"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083258"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083257"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083258"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083257"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-192"></span><span>    </span><span id="local-6989586621679082726"><span class="annot"><span class="annottext">empty :: forall a. WriterT w m a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, w)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-193"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#empty"><span class="hs-pragma hs-type">empty</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-194"></span><span>    </span><span id="local-6989586621679082723"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082723"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679082722"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a. WriterT w m a -&gt; WriterT w m a -&gt; WriterT w m a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;|&gt;</span></a></span></span><span> </span><span id="local-6989586621679082720"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082720"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082723"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; m (a, w) -&gt; m (a, w)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082720"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-195"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&lt;|&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span id="local-6989586621679083249"><span id="local-6989586621679083250"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082713"><span id="local-6989586621679082715"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083250"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083249"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083250"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083249"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">
#if !(MIN_VERSION_base(4,8,0))
</span><span>    </span><span class="hs-identifier">return</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">writer</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">a</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">mempty</span><span class="hs-special">)</span><span>
</span><span id="line-200"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">return</span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#endif
</span><span>    </span><span id="local-6989586621679082707"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082707"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679082706"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. WriterT w m a -&gt; (a -&gt; WriterT w m b) -&gt; WriterT w m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621679082705"><span class="annot"><span class="annottext">a -&gt; WriterT w m b
</span><a href="#local-6989586621679082705"><span class="hs-identifier hs-var">k</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (b, w) -&gt; WriterT w m b
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (b, w) -&gt; WriterT w m b) -&gt; m (b, w) -&gt; WriterT w m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-203"></span><span>        </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082704"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082704"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082703"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082703"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082707"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-204"></span><span>        </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082702"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082702"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082701"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082701"><span class="hs-identifier hs-var">w'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WriterT w m b -&gt; m (b, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; WriterT w m b
</span><a href="#local-6989586621679082705"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082704"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-205"></span><span>        </span><span class="annot"><span class="annottext">(b, w) -&gt; m (b, w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082702"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082703"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; w -&gt; w
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082701"><span class="hs-identifier hs-var">w'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&gt;&gt;=</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">
#if !(MIN_VERSION_base(4,13,0))
</span><span>    </span><span class="hs-identifier">fail</span><span> </span><span class="hs-identifier">msg</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WriterT</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">fail</span><span> </span><span class="hs-identifier">msg</span><span>
</span><span id="line-209"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">fail</span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span id="local-6989586621679083241"><span id="local-6989586621679083242"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083242"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">Fail.MonadFail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083241"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">Fail.MonadFail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083242"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083241"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-214"></span><span>    </span><span id="local-6989586621679082690"><span class="annot"><span class="annottext">fail :: forall a. String -&gt; WriterT w m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var hs-var hs-var hs-var">fail</span></a></span></span><span> </span><span id="local-6989586621679082689"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679082689"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; m (a, w)
forall (m :: * -&gt; *) a. MonadFail m =&gt; String -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">Fail.fail</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679082689"><span class="hs-identifier hs-var">msg</span></a></span><span>
</span><span id="line-215"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-pragma hs-type">fail</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-218"></span><span id="local-6989586621679083232"><span id="local-6989586621679083233"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083233"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083232"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083233"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083232"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-219"></span><span>    </span><span id="local-6989586621679082673"><span class="annot"><span class="annottext">mzero :: forall a. WriterT w m a
</span><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzero</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, w)
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a
</span><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-identifier hs-var">mzero</span></a></span><span>
</span><span id="line-220"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-pragma hs-type">mzero</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-221"></span><span>    </span><span id="local-6989586621679082670"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082670"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679082669"><span class="annot"><span class="annottext">mplus :: forall a. WriterT w m a -&gt; WriterT w m a -&gt; WriterT w m a
</span><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-operator hs-var hs-var hs-var hs-var">`mplus`</span></a></span></span><span> </span><span id="local-6989586621679082667"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082667"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082670"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; m (a, w) -&gt; m (a, w)
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a -&gt; m a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-operator hs-var">`mplus`</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082667"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-222"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-pragma hs-type">mplus</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span id="local-6989586621679083224"><span id="local-6989586621679083225"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083225"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083224"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083225"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083224"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-225"></span><span>    </span><span id="local-6989586621679082656"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; WriterT w m a) -&gt; WriterT w m a
</span><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679082655"><span class="annot"><span class="annottext">a -&gt; WriterT w m a
</span><a href="#local-6989586621679082655"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((a, w) -&gt; m (a, w)) -&gt; m (a, w)
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="annot"><span class="annottext">(((a, w) -&gt; m (a, w)) -&gt; m (a, w))
-&gt; ((a, w) -&gt; m (a, w)) -&gt; m (a, w)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082654"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082654"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; WriterT w m a
</span><a href="#local-6989586621679082655"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082654"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-226"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-pragma hs-type">mfix</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span id="local-6989586621679083217"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083217"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Class.html#MonadTrans"><span class="hs-identifier hs-type">MonadTrans</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083217"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-229"></span><span>    </span><span id="local-6989586621679082645"><span class="annot"><span class="annottext">lift :: forall (m :: * -&gt; *) a. Monad m =&gt; m a -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var hs-var hs-var hs-var">lift</span></a></span></span><span> </span><span id="local-6989586621679082643"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679082643"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-230"></span><span>        </span><span id="local-6989586621679082642"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082642"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679082643"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-231"></span><span>        </span><span class="annot"><span class="annottext">(a, w) -&gt; m (a, w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082642"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-232"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Class.html#lift"><span class="hs-pragma hs-type">lift</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span id="local-6989586621679083208"><span id="local-6989586621679083209"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083209"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083208"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083209"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083208"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-235"></span><span>    </span><span id="local-6989586621679082629"><span class="annot"><span class="annottext">liftIO :: forall a. IO a -&gt; WriterT w m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftIO</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; WriterT w m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; WriterT w m a) -&gt; (IO a -&gt; m a) -&gt; IO a -&gt; WriterT w m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IO a -&gt; m a
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span>
</span><span id="line-236"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-pragma hs-type">liftIO</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">

#if MIN_VERSION_base(4,4,0)
</span><span id="local-6989586621679083197"><span id="local-6989586621679083198"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082621"><span id="local-6989586621679082624"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083198"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083197"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083198"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083197"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-240"></span><span>    </span><span id="local-6989586621679082617"><span class="annot"><span class="annottext">mzipWith :: forall a b c.
(a -&gt; b -&gt; c) -&gt; WriterT w m a -&gt; WriterT w m b -&gt; WriterT w m c
</span><a href="#local-6989586621679082617"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span id="local-6989586621679082616"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679082616"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span id="local-6989586621679082615"><span class="annot"><span class="annottext">m (a, w)
</span><a href="#local-6989586621679082615"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span id="local-6989586621679082614"><span class="annot"><span class="annottext">m (b, w)
</span><a href="#local-6989586621679082614"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (c, w) -&gt; WriterT w m c
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (c, w) -&gt; WriterT w m c) -&gt; m (c, w) -&gt; WriterT w m c
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-241"></span><span>        </span><span class="annot"><span class="annottext">((a, w) -&gt; (b, w) -&gt; (c, w)) -&gt; m (a, w) -&gt; m (b, w) -&gt; m (c, w)
forall (m :: * -&gt; *) a b c.
MonadZip m =&gt;
(a -&gt; b -&gt; c) -&gt; m a -&gt; m b -&gt; m c
</span><a href="../../base/src/Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var">mzipWith</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082613"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082613"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082612"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082612"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082611"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082611"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082610"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082610"><span class="hs-identifier hs-var">w'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679082616"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082613"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679082611"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082612"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; w -&gt; w
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082610"><span class="hs-identifier hs-var">w'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (a, w)
</span><a href="#local-6989586621679082615"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">m (b, w)
</span><a href="#local-6989586621679082614"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-242"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#mzipWith"><span class="hs-pragma hs-type">mzipWith</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#if MIN_VERSION_base(4,12,0)
</span><span id="local-6989586621679083187"><span id="local-6989586621679083188"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679082607"><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083188"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083187"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083188"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-247"></span><span>    </span><span id="local-6989586621679082604"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; WriterT w m a -&gt; WriterT w m a'
</span><a href="../../base/src/Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679082602"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679082602"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; m (a', w)) -&gt; WriterT w m a -&gt; WriterT w m a'
forall (m :: * -&gt; *) a w (n :: * -&gt; *) b w'.
(m (a, w) -&gt; n (b, w')) -&gt; WriterT w m a -&gt; WriterT w' n b
</span><a href="Control.Monad.Trans.Writer.Lazy.html#mapWriterT"><span class="hs-identifier hs-var">mapWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">((m (a, w) -&gt; m (a', w)) -&gt; WriterT w m a -&gt; WriterT w m a')
-&gt; (m (a, w) -&gt; m (a', w)) -&gt; WriterT w m a -&gt; WriterT w m a'
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((a', w) -&gt; (a, w)) -&gt; m (a, w) -&gt; m (a', w)
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="../../base/src/Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">(((a', w) -&gt; (a, w)) -&gt; m (a, w) -&gt; m (a', w))
-&gt; ((a', w) -&gt; (a, w)) -&gt; m (a, w) -&gt; m (a', w)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082601"><span class="annot"><span class="annottext">a'
</span><a href="#local-6989586621679082601"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082600"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082600"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679082602"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a'
</span><a href="#local-6989586621679082601"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082600"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-248"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#contramap"><span class="hs-pragma hs-type">contramap</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-251"></span><span class="hs-comment">-- | @'tell' w@ is an action that produces the output @w@.</span><span>
</span><span id="line-252"></span><span id="local-6989586621679083183"><span id="local-6989586621679083184"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#tell"><span class="hs-identifier hs-type">tell</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083184"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679083183"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083183"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083184"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-253"></span><span id="tell"><span class="annot"><span class="annottext">tell :: forall (m :: * -&gt; *) w. Monad m =&gt; w -&gt; WriterT w m ()
</span><a href="Control.Monad.Trans.Writer.Lazy.html#tell"><span class="hs-identifier hs-var hs-var">tell</span></a></span></span><span> </span><span id="local-6989586621679082597"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082597"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((), w) -&gt; WriterT w m ()
forall (m :: * -&gt; *) a w. Monad m =&gt; (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082597"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-254"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#tell"><span class="hs-pragma hs-type">tell</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span class="hs-comment">-- | @'listen' m@ is an action that executes the action @m@ and adds its</span><span>
</span><span id="line-257"></span><span class="hs-comment">-- output to the value of the computation.</span><span>
</span><span id="line-258"></span><span class="hs-comment">--</span><span>
</span><span id="line-259"></span><span class="hs-comment">-- * @'runWriterT' ('listen' m) = 'liftM' (\\ (a, w) -&gt; ((a, w), w)) ('runWriterT' m)@</span><span>
</span><span id="line-260"></span><span id="local-6989586621679083178"><span id="local-6989586621679083179"><span id="local-6989586621679083180"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#listen"><span class="hs-identifier hs-type">listen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083180"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083179"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083180"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083178"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083179"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083180"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083178"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083179"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-261"></span><span id="listen"><span class="annot"><span class="annottext">listen :: forall (m :: * -&gt; *) w a.
Monad m =&gt;
WriterT w m a -&gt; WriterT w m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#listen"><span class="hs-identifier hs-var hs-var">listen</span></a></span></span><span> </span><span id="local-6989586621679082593"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082593"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m ((a, w), w) -&gt; WriterT w m (a, w)
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m ((a, w), w) -&gt; WriterT w m (a, w))
-&gt; m ((a, w), w) -&gt; WriterT w m (a, w)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-262"></span><span>    </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082592"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082592"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082591"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082591"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082593"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-263"></span><span>    </span><span class="annot"><span class="annottext">((a, w), w) -&gt; m ((a, w), w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082592"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082591"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082591"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#listen"><span class="hs-pragma hs-type">listen</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span class="hs-comment">-- | @'listens' f m@ is an action that executes the action @m@ and adds</span><span>
</span><span id="line-267"></span><span class="hs-comment">-- the result of applying @f@ to the output to the value of the computation.</span><span>
</span><span id="line-268"></span><span class="hs-comment">--</span><span>
</span><span id="line-269"></span><span class="hs-comment">-- * @'listens' f m = 'liftM' (id *** f) ('listen' m)@</span><span>
</span><span id="line-270"></span><span class="hs-comment">--</span><span>
</span><span id="line-271"></span><span class="hs-comment">-- * @'runWriterT' ('listens' f m) = 'liftM' (\\ (a, w) -&gt; ((a, f w), w)) ('runWriterT' m)@</span><span>
</span><span id="line-272"></span><span id="local-6989586621679083171"><span id="local-6989586621679083172"><span id="local-6989586621679083173"><span id="local-6989586621679083174"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#listens"><span class="hs-identifier hs-type">listens</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083174"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083173"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679083172"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083173"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083174"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083171"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083173"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083174"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083171"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083172"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-273"></span><span id="listens"><span class="annot"><span class="annottext">listens :: forall (m :: * -&gt; *) w b a.
Monad m =&gt;
(w -&gt; b) -&gt; WriterT w m a -&gt; WriterT w m (a, b)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#listens"><span class="hs-identifier hs-var hs-var">listens</span></a></span></span><span> </span><span id="local-6989586621679082587"><span class="annot"><span class="annottext">w -&gt; b
</span><a href="#local-6989586621679082587"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679082586"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082586"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m ((a, b), w) -&gt; WriterT w m (a, b)
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m ((a, b), w) -&gt; WriterT w m (a, b))
-&gt; m ((a, b), w) -&gt; WriterT w m (a, b)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-274"></span><span>    </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082585"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082585"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082584"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082584"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082586"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-275"></span><span>    </span><span class="annot"><span class="annottext">((a, b), w) -&gt; m ((a, b), w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082585"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w -&gt; b
</span><a href="#local-6989586621679082587"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082584"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082584"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#listens"><span class="hs-pragma hs-type">listens</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-277"></span><span>
</span><span id="line-278"></span><span class="hs-comment">-- | @'pass' m@ is an action that executes the action @m@, which returns</span><span>
</span><span id="line-279"></span><span class="hs-comment">-- a value and a function, and returns the value, applying the function</span><span>
</span><span id="line-280"></span><span class="hs-comment">-- to the output.</span><span>
</span><span id="line-281"></span><span class="hs-comment">--</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- * @'runWriterT' ('pass' m) = 'liftM' (\\ ((a, f), w) -&gt; (a, f w)) ('runWriterT' m)@</span><span>
</span><span id="line-283"></span><span id="local-6989586621679083164"><span id="local-6989586621679083165"><span id="local-6989586621679083166"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#pass"><span class="hs-identifier hs-type">pass</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083166"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083165"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083166"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083164"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679083165"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679083165"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083165"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083166"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083164"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-284"></span><span id="pass"><span class="annot"><span class="annottext">pass :: forall (m :: * -&gt; *) w a.
Monad m =&gt;
WriterT w m (a, w -&gt; w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#pass"><span class="hs-identifier hs-var hs-var">pass</span></a></span></span><span> </span><span id="local-6989586621679082580"><span class="annot"><span class="annottext">WriterT w m (a, w -&gt; w)
</span><a href="#local-6989586621679082580"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-285"></span><span>    </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679082579"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082579"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082578"><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679082578"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082577"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082577"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WriterT w m (a, w -&gt; w) -&gt; m ((a, w -&gt; w), w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m (a, w -&gt; w)
</span><a href="#local-6989586621679082580"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-286"></span><span>    </span><span class="annot"><span class="annottext">(a, w) -&gt; m (a, w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082579"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679082578"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082577"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-287"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#pass"><span class="hs-pragma hs-type">pass</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span class="hs-comment">-- | @'censor' f m@ is an action that executes the action @m@ and</span><span>
</span><span id="line-290"></span><span class="hs-comment">-- applies the function @f@ to its output, leaving the return value</span><span>
</span><span id="line-291"></span><span class="hs-comment">-- unchanged.</span><span>
</span><span id="line-292"></span><span class="hs-comment">--</span><span>
</span><span id="line-293"></span><span class="hs-comment">-- * @'censor' f m = 'pass' ('liftM' (\\ x -&gt; (x,f)) m)@</span><span>
</span><span id="line-294"></span><span class="hs-comment">--</span><span>
</span><span id="line-295"></span><span class="hs-comment">-- * @'runWriterT' ('censor' f m) = 'liftM' (\\ (a, w) -&gt; (a, f w)) ('runWriterT' m)@</span><span>
</span><span id="line-296"></span><span id="local-6989586621679083158"><span id="local-6989586621679083159"><span id="local-6989586621679083160"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#censor"><span class="hs-identifier hs-type">censor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083160"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083159"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679083159"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083159"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083160"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083158"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083159"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083160"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083158"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-297"></span><span id="censor"><span class="annot"><span class="annottext">censor :: forall (m :: * -&gt; *) w a.
Monad m =&gt;
(w -&gt; w) -&gt; WriterT w m a -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#censor"><span class="hs-identifier hs-var hs-var">censor</span></a></span></span><span> </span><span id="local-6989586621679082573"><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679082573"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679082572"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082572"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-298"></span><span>    </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679082571"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082571"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679082570"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082570"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082572"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-299"></span><span>    </span><span class="annot"><span class="annottext">(a, w) -&gt; m (a, w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082571"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679082573"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679082570"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-300"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#censor"><span class="hs-pragma hs-type">censor</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="hs-comment">-- | Lift a @callCC@ operation to the new monad.</span><span>
</span><span id="line-303"></span><span id="local-6989586621679083151"><span id="local-6989586621679083152"><span id="local-6989586621679083153"><span id="local-6989586621679083154"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#liftCallCC"><span class="hs-identifier hs-type">liftCallCC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083154"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#CallCC"><span class="hs-identifier hs-type">CallCC</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083153"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083152"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679083154"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083151"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679083154"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#CallCC"><span class="hs-identifier hs-type">CallCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083154"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083153"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679083152"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083151"><span class="hs-identifier hs-type">b</span></a></span></span></span></span></span><span>
</span><span id="line-304"></span><span id="liftCallCC"><span class="annot"><span class="annottext">liftCallCC :: forall w (m :: * -&gt; *) a b.
Monoid w =&gt;
CallCC m (a, w) (b, w) -&gt; CallCC (WriterT w m) a b
</span><a href="Control.Monad.Trans.Writer.Lazy.html#liftCallCC"><span class="hs-identifier hs-var hs-var">liftCallCC</span></a></span></span><span> </span><span id="local-6989586621679082567"><span class="annot"><span class="annottext">CallCC m (a, w) (b, w)
</span><a href="#local-6989586621679082567"><span class="hs-identifier hs-var">callCC</span></a></span></span><span> </span><span id="local-6989586621679082566"><span class="annot"><span class="annottext">(a -&gt; WriterT w m b) -&gt; WriterT w m a
</span><a href="#local-6989586621679082566"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-305"></span><span>    </span><span class="annot"><span class="annottext">CallCC m (a, w) (b, w)
</span><a href="#local-6989586621679082567"><span class="hs-identifier hs-var">callCC</span></a></span><span> </span><span class="annot"><span class="annottext">CallCC m (a, w) (b, w) -&gt; CallCC m (a, w) (b, w)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679082565"><span class="annot"><span class="annottext">(a, w) -&gt; m (b, w)
</span><a href="#local-6989586621679082565"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-306"></span><span>    </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; WriterT w m b) -&gt; WriterT w m a
</span><a href="#local-6989586621679082566"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679082564"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082564"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">m (b, w) -&gt; WriterT w m b
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (b, w) -&gt; WriterT w m b) -&gt; m (b, w) -&gt; WriterT w m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m (b, w)
</span><a href="#local-6989586621679082565"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679082564"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-307"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#liftCallCC"><span class="hs-pragma hs-type">liftCallCC</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span class="hs-comment">-- | Lift a @catchE@ operation to the new monad.</span><span>
</span><span id="line-310"></span><span id="local-6989586621679083142"><span id="local-6989586621679083143"><span id="local-6989586621679083144"><span id="local-6989586621679083145"><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#liftCatch"><span class="hs-identifier hs-type">liftCatch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#Catch"><span class="hs-identifier hs-type">Catch</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083145"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083144"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679083143"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679083142"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#Catch"><span class="hs-identifier hs-type">Catch</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083145"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-type">WriterT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083142"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679083144"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679083143"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span><span>
</span><span id="line-311"></span><span id="liftCatch"><span class="annot"><span class="annottext">liftCatch :: forall e (m :: * -&gt; *) a w.
Catch e m (a, w) -&gt; Catch e (WriterT w m) a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#liftCatch"><span class="hs-identifier hs-var hs-var">liftCatch</span></a></span></span><span> </span><span id="local-6989586621679082563"><span class="annot"><span class="annottext">Catch e m (a, w)
</span><a href="#local-6989586621679082563"><span class="hs-identifier hs-var">catchE</span></a></span></span><span> </span><span id="local-6989586621679082562"><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082562"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679082561"><span class="annot"><span class="annottext">e -&gt; WriterT w m a
</span><a href="#local-6989586621679082561"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-312"></span><span>    </span><span class="annot"><span class="annottext">m (a, w) -&gt; WriterT w m a
forall w (m :: * -&gt; *) a. m (a, w) -&gt; WriterT w m a
</span><a href="Control.Monad.Trans.Writer.Lazy.html#WriterT"><span class="hs-identifier hs-var">WriterT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, w) -&gt; WriterT w m a) -&gt; m (a, w) -&gt; WriterT w m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="annot"><span class="annottext">WriterT w m a
</span><a href="#local-6989586621679082562"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Catch e m (a, w)
</span><a href="#local-6989586621679082563"><span class="hs-operator hs-var">`catchE`</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679082560"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679082560"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">WriterT w m a -&gt; m (a, w)
forall w (m :: * -&gt; *) a. WriterT w m a -&gt; m (a, w)
</span><a href="Control.Monad.Trans.Writer.Lazy.html#runWriterT"><span class="hs-identifier hs-var hs-var">runWriterT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; WriterT w m a
</span><a href="#local-6989586621679082561"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679082560"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-313"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Writer.Lazy.html#liftCatch"><span class="hs-pragma hs-type">liftCatch</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-314"></span></pre></body></html>